package com.wangxiaotao.Service;

import com.wangxiaotao.Dao.ShopDao;
import com.wangxiaotao.Pojo.Goods;
import com.wangxiaotao.Pojo.Goods_Shops;
import com.wangxiaotao.Pojo.Shops;
import com.wangxiaotao.Pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopService {
    @Autowired
    ShopDao shopDao;

    public Goods getgoods(int goods_id) {
        return shopDao.getgoods(goods_id);
    }

    public void addnewshop(Shops shops1) {
        shopDao.addnewshop(shops1);
    }

    public List<Shops> getshop(String username) {
        return shopDao.getshop(username);
    }

    public void addshopnum(Shops shops1) {
        shopDao.addshopnum(shops1);
    }

    public List<Goods> getgoods_type(int goods_type) {
        return shopDao.getgoods_type(goods_type);
    }

    public List<Goods_Shops> setshop_car(String username) {
        return shopDao.setshop_car(username);
    }

    public void shop_num_change(Shops shops) {
        shopDao.shop_num_change(shops);
    }

    public void deleteshop(Shops shops) {
        shopDao.deleteshop(shops);
    }

    public void postshops(User user) {
        shopDao.postshops(user);
    }

    public int getallorders(String username) {
        return shopDao.getallorders(username);
    }

    public Double getallprice(String username) {
        return shopDao.getallprice(username);
    }
}
